package org.dxy.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.dxy.entity.User;

@Mapper
public interface UserMapper {

    @Select("select * from user where user_id = #{userId}")
    User findById(Long userId);

    User save(User user);

    @Select("select * from user where user_name = #{username}")
    User findByUsername(String username);

    @Select("select * from user where phone = #{phone}")
    User findByPhone(String phone);
}
